<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
    <title></title>
    <base href="<%=basePath%>">
    <!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<link href="static/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="static/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="static/admin/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="static/admin/css/admin-all.css" />
    <script type="text/javascript" src="static/admin/js/jquery-1.7.2.js"></script>
    <script type="text/javascript" src="static/admin/js/jquery-ui-1.8.22.custom.min.js"></script>
    <link rel="stylesheet" type="text/css" href="Styles/ui-lightness/jquery-ui-1.8.22.custom.css" />
<title>修改密码</title>
</head>
<body>
 <div class="alert alert-info">当前位置<b class="tip"></b>用户管理<b class="tip"></b>密码修改</div>
<div class="pd-20">
	<form action="user/updatePassword.do" method="post" class="form form-horizontal" id="form-change-password" onsubmit="return validate();">
		<input type="hidden" value="${user.USERNAME}"/>
		<div class="row cl">
			<label class="form-label col-4"><span class="c-red">*</span>用户名：</label>
			<div class="formControls col-4"> ${user.USERNAME} </div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-4"><span class="c-red">*</span>新密码：</label>
			<div class="formControls col-4">
			<!-- bootstrap控制表单 class="input-text" -->
				<input type="password" style="height:28px;" autocomplete="off" placeholder="请输入新密码" name="new-password" id="new-password" datatype="*6-18" ignore="ignore" >
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-4"><span class="c-red">*</span>确认密码：</label>
			<div class="formControls col-4">
				<input type="password" style="height:28px;" autocomplete="off" placeholder="请再次输入密码" name="new-password2" id="new-password2" recheck="new-password" datatype="*6-18" errormsg="您两次输入的密码不一致！" ignore="ignore" >
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<div class="col-8 col-offset-4">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;保存&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</div>
<script type="text/javascript" src="static/admin/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="static/admin/lib/Validform/5.3.2/Validform.min.js"></script> 
<script type="text/javascript" src="static/admin/lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="static/admin/js/H-ui.js"></script> 
<script type="text/javascript" src="static/admin/js/H-ui.admin.js"></script>
<script>
function validate(){
        var pwd1 = document.getElementById("new-password");
        var pwd2 = document.getElementById("new-password2");
        if(trim(pwd1.value)==null || trim(pwd1.value)==""){
            alert("请输入新密码！");
            pwd1.focus();
            return false;
        }
        if(trim(pwd2.value)==null || trim(pwd2.value)==""){
            alert("请再次输入密码！");
            pwd2.focus();
            return false;
        }
		if(pwd2.value != pwd1.value){
			alert("两次密码输入不一致！");
            pwd1.focus();
            return false;
		}
        return true;
    }
    function trim(str){ //删除左右两端的空格
     return str.replace(/(^\s*)|(\s*$)/g, "");
    }
</script>
</body>
</html>